
class Calculation():
    def my_add(self, num1: int, num2: int):
        if type(num1) == str or type(num2) == str:
            return "参数不能为字符串"
        else:
            return num1+num2

    def my_reduce(self, num1, num2):
        if type(num1) == str or type(num2) == str:
            return "参数不能为字符串"
        else:
            return num1-num2

    def my_ride(self, num1, num2):
        if type(num1) == str or type(num2) == str:
            return "参数不能为字符串"
        else:
            return num1*num2

    def my_except(self, num1, num2):
        if type(num1) == str or type(num2) == str:
            return "参数不能为字符串"
        elif num2 == 0:
            return "被除数不能为0"
        else:
            return num1/num2